package com.ruoyi.recycle.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 问答库设置对象 essay_question
 * 
 * @author Wubk
 * @date 2022-05-22
 */
@ApiModel("问答库设置")
@Accessors(chain = true)
@Data
public class EssayQuestion implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 租户号 */
    @ApiModelProperty(name = "id",value = "租户号",dataType = "Long")
    private Long id;

    /** 问题 */
    @Excel(name = "问题")
    @ApiModelProperty(name = "question",value = "问题",dataType = "String")
    private String question;

    /** 答案 */
    @Excel(name = "答案")
    @ApiModelProperty(name = "answer",value = "答案",dataType = "String")
    private String answer;

    /** 分类 */
    @Excel(name = "分类")
    @ApiModelProperty(name = "type",value = "分类",dataType = "String")
    private String type;

    /** 排序 */
    @Excel(name = "排序")
    @ApiModelProperty(name = "essaySort",value = "排序",dataType = "Integer")
    private Integer essaySort;

    /** 创建人 */
    @Excel(name = "创建人")
    @ApiModelProperty(name = "createdBy",value = "创建人",dataType = "String")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(name = "createdTime", value = "创建时间", dataType = "Date", notes = "yyyy-MM-dd")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    /** 更新人 */
    @Excel(name = "更新人")
    @ApiModelProperty(name = "updatedBy",value = "更新人",dataType = "String")
    private String updatedBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(name = "updatedTime",value = "更新时间",dataType = "Date",notes = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("question", getQuestion())
            .append("answer", getAnswer())
            .append("type", getType())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .toString();
    }
}
